'use strict';
exports.main = async (event, context) => {
    // event为客户端上传的参数
    console.log('event : ', event)
    const {fileID} = event;
    try {
        // 调用云存储API删除文件
        const result = await uniCloud.deleteFile({
            fileList: [fileID]
        });
        console.log("删除结果:", result);
        return {
            success: true,
            message: '文件删除成功'
        };
    } catch (error) {
        console.error('删除文件出错:', error);
        return {
            success: false,
            message: '删除文件时发生错误',
            error
        };
    }
}
